package com.it.gmall.item.controller;

import com.it.gmall.item.service.ItemApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/api/item")
public class ItemApiController {
    @Autowired
    private ItemApiService itemApiService;
    /**
     * 汇总商品详情数据
     * @param skuId
     * @return
     */
    @GetMapping("/getItem/{skuId}")
    public Map getItem(@PathVariable long skuId){
        return itemApiService.getItem(skuId);
    }
}
